//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include "CPort.hpp"
#include "CPortCtl.hpp"
#include <ExtCtrls.hpp>
#include <AppEvnts.hpp>
#include <Menus.hpp>
#include <Dialogs.hpp>
#include "AdvSpin.hpp"
#include <Mask.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TPageControl *PageControl1;
        TTabSheet *TabSheet1;
        TComPort *ComPort1;
        TTimer *Timer1;
        TGroupBox *GroupBox6;
        TEdit *Edit2;
        TUpDown *UpDown2;
        TLabel *Label2;
        TLabel *Label3;
        TStatusBar *StatusBar1;
        TButton *Button2;
        TTabSheet *TabSheet5;
        TEdit *Edit1;
        TUpDown *UpDown1;
        TLabel *Label1;
        TButton *Button4;
        TLabel *Label6;
        TLabel *Label4;
        TTabSheet *TabSheet2;
        TLabel *Label5;
        TComComboBox *ComComboBox1;
        TLabel *Label13;
        TEdit *Edit7;
        TUpDown *UpDown7;
        TComboBox *ComboBox1;
        TLabel *Label14;
        TEdit *Edit8;
        TLabel *Label15;
        TLabel *Label16;
        TEdit *Edit9;
        TLabel *Label17;
        TUpDown *UpDown8;
        TLabel *Label18;
        TPanel *Panel3;
        TApplicationEvents *ApplicationEvents1;
        TPanel *Panel2;
        TLabel *Label20;
        TMainMenu *MainMenu1;
        TMenuItem *File1;
        TMenuItem *SaveSettings1;
        TMenuItem *Exit1;
        TSaveDialog *SaveDialog1;
        TMenuItem *OpenSettings1;
        TOpenDialog *OpenDialog1;
        TTabSheet *TabSheet3;
        TButton *Button_1;
        TMemo *Memo1;
        TLabel *Label19;
        TLabel *Label22;
        TPanel *Panel5;
        TCheckBox *CheckBox1;
        TAdvSpinEdit *AdvSpinEdit1;
        void __fastcall Send_buf(int complect, TObject *Sender);
        void __fastcall ComComboBox1Change(TObject *Sender);
        void __fastcall ComPort1RxChar(TObject *Sender, int Count);
        void __fastcall Timer1Timer(TObject *Sender);
        void __fastcall UpDown2ChangingEx(TObject *Sender,
          bool &AllowChange, short NewValue, TUpDownDirection Direction);
        void __fastcall Edit2KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall UpDown3ChangingEx(TObject *Sender,
          bool &AllowChange, short NewValue, TUpDownDirection Direction);
        void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
        void __fastcall Button2Click(TObject *Sender);
        void __fastcall UpDown1ChangingEx(TObject *Sender,
          bool &AllowChange, short NewValue, TUpDownDirection Direction);
        void __fastcall Button1Click(TObject *Sender);
        void __fastcall Button3Click(TObject *Sender);
        void __fastcall Button4Click(TObject *Sender);
        void __fastcall UpDown5ChangingEx(TObject *Sender,
          bool &AllowChange, short NewValue, TUpDownDirection Direction);
        void __fastcall UpDown6ChangingEx(TObject *Sender,
          bool &AllowChange, short NewValue, TUpDownDirection Direction);
        void __fastcall Edit7KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall UpDown7ChangingEx(TObject *Sender,
          bool &AllowChange, short NewValue, TUpDownDirection Direction);
        void __fastcall ApplicationEvents1Idle(TObject *Sender,
          bool &Done);
        void __fastcall Edit8KeyPress(TObject *Sender, char &Key);
        void __fastcall ComboBox1Change(TObject *Sender);
        void __fastcall UpDown8ChangingEx(TObject *Sender,
          bool &AllowChange, short NewValue, TUpDownDirection Direction);
        void __fastcall Exit1Click(TObject *Sender);
        void __fastcall OpenSettings1Click(TObject *Sender);
        void __fastcall SaveSettings1Click(TObject *Sender);
        void __fastcall Edit8Change(TObject *Sender);
        void __fastcall Button_1Click(TObject *Sender);
        void __fastcall AdvSpinEdit1Change(TObject *Sender);
        void __fastcall CheckBox1Click(TObject *Sender);
        void __fastcall AdvSpinEdit1KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);

private:	// User declarations
public:		// User declarations
#define MIN_FREQ 4800
#define MAX_FREQ 5650
#define MAX_ATT 63
        unsigned char NET_ADR;

        bool operate;
        int awaiting_answer;
        int com_counter1;
        bool rcvd;
        unsigned char awaiting_counter;
        unsigned char ComandLength1;
        unsigned char ComandLength2;
        unsigned char t_buf[24];
        unsigned char rcv_buffer1[256];
        int geter[4];
        __fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif

